package cn.cvs.dao.apply;

import cn.cvs.pojo.Apply;
import cn.cvs.pojo.StorageRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 供货单数据层接口
 */
public interface ApplyMapper {


	/**
	 * 增加
	 * @param apply
	 * @return
	 * @throws Exception
	 */
	public int add(Apply apply);

	/**
	 * 条件查询

	 * @param pageBegin
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Apply> selectList(@Param("applyTime") String applyTime,@Param("status") Integer status, @Param("pageBegin") Integer pageBegin
			, @Param("pageSize") Integer pageSize);

	/**
	 * 条件查询总数

	 * @return
	 * @throws Exception
	 */
	public int selectCount(@Param("applyTime") String applyTime,@Param("status") Integer status);

	/**
	 * 根据id删除
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteById(@Param("id") Integer id);


	/**
	 * 根据id查询
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Apply selectById(@Param("id") Integer id);

	/**
	 * 修改
	 * @param apply
	 * @return
	 * @throws Exception
	 */
	public int update(Apply apply);

}
